﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Rison.DataAccess.Common;
using Rison.DBHelper;

namespace Rison.DataAccess.Data.ZP
{
    public sealed class YxsbDb : DataAccessBase
    {
        protected override string tableName 
        {
            get { return "SelfExam_Grsb"; }
        }

        public DataSet GetInformation(string departid, string year)
        {
            StringBuilder sql = new StringBuilder();
            sql.AppendFormat("select * from {0} where departid ='{1}' and year='{2}' order by LastModifedTime desc", tableName, departid, year);

            return base.ExecuteSql(sql.ToString(), "GetInformation");
        }

        public DataRow GetInformationToRow(string id)
        {
            StringBuilder sql = new StringBuilder();
            sql.AppendFormat("select * from {0} where id ='{1}'", tableName, id);

            return base.ExecuteSqlToDataRow(sql.ToString());
        }
    }
}
